#ifndef MINEDESIGN3D_CONFIGMANAGER
#define MINEDESIGN3D_CONFIGMANAGER
#include "Util/Singleton.hpp"
#include "MineDesign3D/ConfigIO.hpp"
namespace MineDesign3D{
class ConfigManager : public Util::Singleton<ConfigManager>
{
public:
	ConfigManager():m_configIO()
	{
		m_configIO.load();
	}
	~ConfigManager()
	{
		m_configIO.save();
	}

	void setBackColor(float r,float g,float b) { m_configIO.setBackColor(r,g,b); }
	boost::tuple<float,float,float> getBackColor()const { return m_configIO.getBackColor(); }
private:
	ConfigIO m_configIO;
};
}//MineDesign3D

inline MineDesign3D::ConfigManager* g_pConfigManager()
{
	return MineDesign3D::ConfigManager::pInstance();
}
#endif